using System.Collections.Generic;
using System.Web.Mvc;

namespace Quintsys.BootstrapSupport.HtmlHelpers
{
    public static class GlyphIcons
    {
        // example usage:
        // <li>@Html.ActionLinkWithGlyphIcon(Url.Action("Index"),
        //                                   "Back to List",
        //                                   "icon-list")</li>
        // instead of "icon-list", we could also use GlyphIcons.list
        public static MvcHtmlString ActionLinkWithGlyphIcon(this HtmlHelper helper,
                                                            string action,
                                                            string text,
                                                            string glyphs,
                                                            string tooltip = "",
                                                            IDictionary<string, object> htmlAttributes = null)
        {
            var glyph = new TagBuilder("i");
            glyph.MergeAttribute("class", glyphs);

            var anchor = new TagBuilder("a");
            anchor.MergeAttribute("href", action);

            if (!string.IsNullOrEmpty(tooltip))
                anchor.MergeAttributes(
                    new Dictionary<string, object>
                        {
                            {"rel", "tooltip"},
                            {"data-placement", "top"},
                            {"title", tooltip}
                        }
                    );

            if (htmlAttributes != null)
                anchor.MergeAttributes(htmlAttributes, true);

            anchor.InnerHtml = glyph + " " + text;

            return MvcHtmlString.Create(anchor.ToString());
        }

        #region icon constants

        public const string Glass = "icon-glass";
        public const string Music = "icon-music";
        public const string Search = "icon-search";
        public const string Envelope = "icon-envelope";
        public const string Heart = "icon-heart";
        public const string Star = "icon-star";
        public const string StarEmpty = "icon-star-empty";
        public const string User = "icon-user";
        public const string Film = "icon-film";
        public const string ThLarge = "icon-th-large";
        public const string Th = "icon-th";
        public const string ThList = "icon-th-list";
        public const string Ok = "icon-ok";
        public const string Remove = "icon-remove";
        public const string ZoomIn = "icon-zoom-in";
        public const string ZoomOut = "icon-zoom-out";
        public const string Off = "icon-off";
        public const string Signal = "icon-signal";
        public const string Cog = "icon-cog";
        public const string Trash = "icon-trash";
        public const string Home = "icon-home";
        public const string File = "icon-file";
        public const string Time = "icon-time";
        public const string Road = "icon-road";
        public const string DownloadAlt = "icon-download-alt";
        public const string Download = "icon-download";
        public const string Upload = "icon-upload";
        public const string Inbox = "icon-inbox";
        public const string PlayCircle = "icon-play-circle";
        public const string Refresh = "icon-refresh";
        public const string Repeat = "icon-repeat";
        public const string ListAlt = "icon-list-alt";
        public const string Lock = "icon-lock";
        public const string Flag = "icon-flag";
        public const string Headphones = "icon-headphones";
        public const string VolumeOff = "icon-volume-off";
        public const string VolumeDown = "icon-volume-down";
        public const string VolumeUp = "icon-volume-up";
        public const string Qrcode = "icon-qrcode";
        public const string Barcode = "icon-barcode";
        public const string Tag = "icon-tag";
        public const string Tags = "icon-tags";
        public const string Book = "icon-book";
        public const string Bookmark = "icon-bookmark";
        public const string Print = "icon-print";
        public const string Camera = "icon-camera";
        public const string Font = "icon-font";
        public const string Bold = "icon-bold";
        public const string Italic = "icon-italic";
        public const string TextHeight = "icon-text-height";
        public const string TextWidth = "icon-text-width";
        public const string AlignLeft = "icon-align-left";
        public const string AlignCenter = "icon-align-center";
        public const string AlignRight = "icon-align-right";
        public const string AlignJustify = "icon-align-justify";
        public const string List = "icon-list";
        public const string IndentLeft = "icon-indent-left";
        public const string IndentRight = "icon-indent-right";
        public const string FacetimeVideo = "icon-facetime-video";
        public const string Picture = "icon-picture";
        public const string Pencil = "icon-pencil";
        public const string MapMarker = "icon-map-marker";
        public const string Adjust = "icon-adjust";
        public const string Tint = "icon-tint";
        public const string Edit = "icon-edit";
        public const string Share = "icon-share";
        public const string Check = "icon-check";
        public const string Move = "icon-move";
        public const string StepBackward = "icon-step-backward";
        public const string FastBackward = "icon-fast-backward";
        public const string Backward = "icon-backward";
        public const string Play = "icon-play";
        public const string Pause = "icon-pause";
        public const string Stop = "icon-stop";
        public const string Forward = "icon-forward";
        public const string FastForward = "icon-fast-forward";
        public const string StepForward = "icon-step-forward";
        public const string Eject = "icon-eject";
        public const string ChevronLeft = "icon-chevron-left";
        public const string ChevronRight = "icon-chevron-right";
        public const string PlusSign = "icon-plus-sign";
        public const string MinusSign = "icon-minus-sign";
        public const string RemoveSign = "icon-remove-sign";
        public const string OkSign = "icon-ok-sign";
        public const string QuestionSign = "icon-question-sign";
        public const string InfoSign = "icon-info-sign";
        public const string Screenshot = "icon-screenshot";
        public const string RemoveCircle = "icon-remove-circle";
        public const string OkCircle = "icon-ok-circle";
        public const string BanCircle = "icon-ban-circle";
        public const string ArrowLeft = "icon-arrow-left";
        public const string ArrowRight = "icon-arrow-right";
        public const string ArrowUp = "icon-arrow-up";
        public const string ArrowDown = "icon-arrow-down";
        public const string ShareAlt = "icon-share-alt";
        public const string ResizeFull = "icon-resize-full";
        public const string ResizeSmall = "icon-resize-small";
        public const string Plus = "icon-plus";
        public const string Minus = "icon-minus";
        public const string Asterisk = "icon-asterisk";
        public const string ExclamationSign = "icon-exclamation-sign";
        public const string Gift = "icon-gift";
        public const string Leaf = "icon-leaf";
        public const string Fire = "icon-fire";
        public const string EyeOpen = "icon-eye-open";
        public const string EyeClose = "icon-eye-close";
        public const string WarningSign = "icon-warning-sign";
        public const string Plane = "icon-plane";
        public const string Calendar = "icon-calendar";
        public const string Random = "icon-random";
        public const string Comment = "icon-comment";
        public const string Magnet = "icon-magnet";
        public const string ChevronUp = "icon-chevron-up";
        public const string ChevronDown = "icon-chevron-down";
        public const string Retweet = "icon-retweet";
        public const string ShoppingCart = "icon-shopping-cart";
        public const string FolderClose = "icon-folder-close";
        public const string FolderOpen = "icon-folder-open";
        public const string ResizeVertical = "icon-resize-vertical";
        public const string ResizeHorizontal = "icon-resize-horizontal";
        public const string Hdd = "icon-hdd";
        public const string Bullhorn = "icon-bullhorn";
        public const string Bell = "icon-bell";
        public const string Certificate = "icon-certificate";
        public const string ThumbsUp = "icon-thumbs-up";
        public const string ThumbsDown = "icon-thumbs-down";
        public const string HandRight = "icon-hand-right";
        public const string HandLeft = "icon-hand-left";
        public const string HandUp = "icon-hand-up";
        public const string HandDown = "icon-hand-down";
        public const string CircleArrowRight = "icon-circle-arrow-right";
        public const string CircleArrowLeft = "icon-circle-arrow-left";
        public const string CircleArrowUp = "icon-circle-arrow-up";
        public const string CircleArrowDown = "icon-circle-arrow-down";
        public const string Globe = "icon-globe";
        public const string Wrench = "icon-wrench";
        public const string Tasks = "icon-tasks";
        public const string Filter = "icon-filter";
        public const string Briefcase = "icon-briefcase";
        public const string Fullscreen = "icon-fullscreen";

        #endregion
    }
}